<script setup lang="ts" >
import { getUserList } from '@/api/common';
import { Ref, ref } from 'vue';
const users:Ref<Array<User>>=ref([]);
const getUsers = async () => {
    users.value = await getUserList() as Array<User>;
}
</script>

<template>
    <slot></slot>
    <button @click="getUsers">getUsersByApi</button>
    <ul>
        <li v-for="u in users">{{(u as User).name}}</li>
    </ul>
</template>